package com.dxtan90.order.impl;

import com.dxtan90.bean.Position;
import com.dxtan90.order.ARobotOrder;
import com.dxtan90.utils.PositionUtils;

/**
 * @author: shijunhao
 * @date: 2021/12/2 16:42
 * @description:
 */
public class KeyPressOrder extends ARobotOrder {
    @Override
    public void doOperation(Position position) {
        robot.delay(OPERA_DELAY);
        robot.keyPress(position.getValue());
    }

    @Override
    public Position analysisData(String data) {
        return PositionUtils.parseKeyPosition(data);
    }
}
